<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>Duplex</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>


<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
  <li><a href="../modules/Duplex.Application.html">Duplex.Application</a></li>
  <li><a href="../modules/Duplex.Applications.Effect.html">Duplex.Applications.Effect</a></li>
  <li><a href="../modules/Duplex.Applications.GridPie.html">Duplex.Applications.GridPie</a></li>
  <li><a href="../modules/Duplex.Applications.Hydra.html">Duplex.Applications.Hydra</a></li>
  <li><a href="../modules/Duplex.Applications.Instrument.html">Duplex.Applications.Instrument</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.GridLayout.html">Duplex.Applications.Keyboard.GridLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.HarmonicLayout.html">Duplex.Applications.Keyboard.Layouts.HarmonicLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.IsomorphicLayout.html">Duplex.Applications.Keyboard.Layouts.IsomorphicLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.Layouts.PianoLayout.html">Duplex.Applications.Keyboard.Layouts.PianoLayout</a></li>
  <li><a href="../modules/Duplex.Applications.Keyboard.html">Duplex.Applications.Keyboard</a></li>
  <li><a href="../modules/Duplex.Applications.Matrix.html">Duplex.Applications.Matrix</a></li>
  <li><a href="../modules/Duplex.Applications.Metronome.html">Duplex.Applications.Metronome</a></li>
  <li><a href="../modules/Duplex.Applications.MidiActions.Bindings.html">Duplex.Applications.MidiActions.Bindings</a></li>
  <li><a href="../modules/Duplex.Applications.MidiActions.html">Duplex.Applications.MidiActions</a></li>
  <li><a href="../modules/Duplex.Applications.Mixer.html">Duplex.Applications.Mixer</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_group.html">Duplex.Applications.Mlrx.Mlrx_group</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_note.html">Duplex.Applications.Mlrx.Mlrx_note</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_pos.html">Duplex.Applications.Mlrx.Mlrx_pos</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.Mlrx_track.html">Duplex.Applications.Mlrx.Mlrx_track</a></li>
  <li><a href="../modules/Duplex.Applications.Mlrx.html">Duplex.Applications.Mlrx</a></li>
  <li><a href="../modules/Duplex.Applications.Navigator.html">Duplex.Applications.Navigator</a></li>
  <li><a href="../modules/Duplex.Applications.NotesOnWheels.html">Duplex.Applications.NotesOnWheels</a></li>
  <li><a href="../modules/Duplex.Applications.PatternCursor.html">Duplex.Applications.PatternCursor</a></li>
  <li><a href="../modules/Duplex.Applications.PatternSequence.html">Duplex.Applications.PatternSequence</a></li>
  <li><a href="../modules/Duplex.Applications.Recorder.html">Duplex.Applications.Recorder</a></li>
  <li><a href="../modules/Duplex.Applications.Repeater.html">Duplex.Applications.Repeater</a></li>
  <li><a href="../modules/Duplex.Applications.Rotate.html">Duplex.Applications.Rotate</a></li>
  <li><strong>Duplex.Applications.StepSequencer</strong></li>
  <li><a href="../modules/Duplex.Applications.SwitchConfiguration.html">Duplex.Applications.SwitchConfiguration</a></li>
  <li><a href="../modules/Duplex.Applications.TestPad.html">Duplex.Applications.TestPad</a></li>
  <li><a href="../modules/Duplex.Applications.TrackSelector.html">Duplex.Applications.TrackSelector</a></li>
  <li><a href="../modules/Duplex.Applications.Transport.html">Duplex.Applications.Transport</a></li>
  <li><a href="../modules/Duplex.Applications.UIButtonTest.html">Duplex.Applications.UIButtonTest</a></li>
  <li><a href="../modules/Duplex.Applications.XYPad.html">Duplex.Applications.XYPad</a></li>
  <li><a href="../modules/Duplex.Automation.html">Duplex.Automation</a></li>
  <li><a href="../modules/Duplex.Browser.html">Duplex.Browser</a></li>
  <li><a href="../modules/Duplex.BrowserProcess.html">Duplex.BrowserProcess</a></li>
  <li><a href="../modules/Duplex.Canvas.html">Duplex.Canvas</a></li>
  <li><a href="../modules/Duplex.CanvasPoint.html">Duplex.CanvasPoint</a></li>
  <li><a href="../modules/Duplex.ControlMap.html">Duplex.ControlMap</a></li>
  <li><a href="../modules/Duplex.Device.html">Duplex.Device</a></li>
  <li><a href="../modules/Duplex.Display.html">Duplex.Display</a></li>
  <li><a href="../modules/Duplex.Globals.html">Duplex.Globals</a></li>
  <li><a href="../modules/Duplex.Message.html">Duplex.Message</a></li>
  <li><a href="../modules/Duplex.MessageStream.html">Duplex.MessageStream</a></li>
  <li><a href="../modules/Duplex.MidiDevice.html">Duplex.MidiDevice</a></li>
  <li><a href="../modules/Duplex.OscClient.html">Duplex.OscClient</a></li>
  <li><a href="../modules/Duplex.OscDevice.html">Duplex.OscDevice</a></li>
  <li><a href="../modules/Duplex.OscVoiceMgr.html">Duplex.OscVoiceMgr</a></li>
  <li><a href="../modules/Duplex.Preferences.html">Duplex.Preferences</a></li>
  <li><a href="../modules/Duplex.ProcessSlicer.html">Duplex.ProcessSlicer</a></li>
  <li><a href="../modules/Duplex.RoamingDSP.html">Duplex.RoamingDSP</a></li>
  <li><a href="../modules/Duplex.Scheduler.html">Duplex.Scheduler</a></li>
  <li><a href="../modules/Duplex.StateController.html">Duplex.StateController</a></li>
  <li><a href="../modules/Duplex.UIButton.html">Duplex.UIButton</a></li>
  <li><a href="../modules/Duplex.UIButtonStrip.html">Duplex.UIButtonStrip</a></li>
  <li><a href="../modules/Duplex.UIComponent.html">Duplex.UIComponent</a></li>
  <li><a href="../modules/Duplex.UIKey.html">Duplex.UIKey</a></li>
  <li><a href="../modules/Duplex.UIKeyPressure.html">Duplex.UIKeyPressure</a></li>
  <li><a href="../modules/Duplex.UILabel.html">Duplex.UILabel</a></li>
  <li><a href="../modules/Duplex.UIPad.html">Duplex.UIPad</a></li>
  <li><a href="../modules/Duplex.UIPitchBend.html">Duplex.UIPitchBend</a></li>
  <li><a href="../modules/Duplex.UISlider.html">Duplex.UISlider</a></li>
  <li><a href="../modules/Duplex.UISpinner.html">Duplex.UISpinner</a></li>
  <li><a href="../modules/Duplex.WidgetHooks.html">Duplex.WidgetHooks</a></li>
  <li><a href="../modules/Duplex.WidgetKeyboard.html">Duplex.WidgetKeyboard</a></li>
  <li><a href="../modules/Duplex.html">Duplex</a></li>
  <li><a href="../modules/main.html">main</a></li>
</ul>

</div>

<div id="content">

<h1>Module <code>Duplex.Applications.StepSequencer</code></h1>
<p>Use your grid controller as a basic step sequencer.</p>
<p>

<p>Inheritance: <a href="../modules/Duplex.Application.html#">Duplex.Application</a> > Duplex.Application.StepSequencer </p>

<p>Each button in the grid corresponds to a line in a track. The grid
is scrollable too - use the line/track mappings to access any part of the
pattern you're editing. </p>

<p>Originally written by daxton.fleming@gmail.com</p>

<h3>How to use:</h3>

<ul>
    <li>Press an empty button to put a note down, using the currently selected
    instrument, base-note and volume</li>
    <li>Press a lit button to remove the note</li>
    <li>Press and hold a lit button to copy the note. Toggle a note on/off somewhere
    else to paste the copied note to this location</li>
    <li>Transpose note up/down by pressing and holding any number of notes, and then
    pressing the transpose buttons. Changes will be applied to all held notes</li>
    <li>Adjust note volume by pressing and holding any number of notes, and then
    pressing a level button. Changes will be applied to all held notes</li>
    <li>Press level/transpose buttons when no notes are held, to adjust the base-note
    and default volume</li>
</ul>

<h3>Changes</h3>



<p>  0.98.21</p>
<pre><code>- Support line_notifier when slots are aliased (also when created and/or removed)
- Workflow: when navigating from a long pattern into a shorter one, start from
  the top (IOW, always restrict to the actual pattern length)
- Fixed: update the volume-level display when base volume is changed
- Fixed: selecting a group track could cause an error
</code></pre>

<p>  0.98.20</p>
<pre><code>- Fixed: focus bug when holding button
</code></pre>

<p>  0.98.18</p>
<pre><code>- Mappings track, level, line, transpose are now optional. This should fix an
  issue with the nano2K config that didn’t specify ‘track’
- Fixed: under certain conditions, could throw error on startup
</code></pre>

<p>  0.98  </p>
<pre><code>- Palette now uses the standard format (easier to customize)
- Sequencer tracks can be linked with instruments, simply by assigning
  the same name to both.
  UISpinner (deprecated) control replaced with UISlider+UIButton(s)
</code></pre>

<p>  0.96</p>
<pre><code>- Option: "follow_track", set to align to selected track in Renoise
- Option: "track_increment", specify custom step size for track-switching
</code></pre>

<p>  0.95  </p>
<pre><code>- The sequencer is now fully synchronized with the currently selected
  pattern in  Renoise. You can copy, delete or move notes around,
  and the StepSequencer will update it's display accordingly
- Enabling Renoise's follow mode will cause instant catch-up
- Display volume/base-note changes in the status bar
- Orientation: use as sideways 16-step sequencer on monome128 etc.
- Option: "increment by this amount" value for navigating lines
- Improved performance
</code></pre>

<p>  0.93  </p>
<pre><code>- Support other devices than the Launchpad (such as the monome)
- Display playposition and volume simultaneously
</code></pre>

<p>  0.92  </p>
<pre><code>- Original version
</code></pre>


</p>


<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#__init">__init (VarArg)</a></td>
	<td class="summary">constructor method</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#start_app">start_app ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#stop_app">stop_app ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_build_app">_build_app ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_build_line">_build_line ()</a></td>
	<td class="summary">line (up/down scrolling)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_build_track">_build_track ()</a></td>
	<td class="summary">track (sideways scrolling)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_build_grid">_build_grid ()</a></td>
	<td class="summary">construct user interface</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_build_level">_build_level ()</a></td>
	<td class="summary">construct user interface</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_build_transpose">_build_transpose ()</a></td>
	<td class="summary">construct user interface</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_idle">on_idle ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_update_track_count">_update_track_count ()</a></td>
	<td class="summary">update track navigator,
 on new song, and when tracks have been changed</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_update_position">_update_position ()</a></td>
	<td class="summary">if the playback position is inside visible range of the sequencer, update
 the position indicator
 else, if follow mode is active, display the current page
 (called on_idle when playing)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_update_page">_update_page ()</a></td>
	<td class="summary">check if we should switch the active page/range inside the pattern</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#get_pos">get_pos ()</a></td>
	<td class="summary">get the current position (edit-pos when stopped, playpos when playing)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#set_page">set_page (idx)</a></td>
	<td class="summary">set the current edit page</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#jump_to_top">jump_to_top ()</a></td>
	<td class="summary">jump to topmost page</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#jump_to_bottom">jump_to_bottom ()</a></td>
	<td class="summary">jump to bottommost page</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#jump_to_prev_lines">jump_to_prev_lines ()</a></td>
	<td class="summary">jump to previous page</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#jump_to_next_lines">jump_to_next_lines ()</a></td>
	<td class="summary">jump to next page</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#post_jump_update">post_jump_update ()</a></td>
	<td class="summary">update display after a jump</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_draw_position">_draw_position (idx)</a></td>
	<td class="summary">called on_idle</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_update_line_count">_update_line_count ()</a></td>
	<td class="summary">update the range of the line navigator</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_update_line_buttons">_update_line_buttons ()</a></td>
	<td class="summary">update the display (line buttons)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_update_grid">_update_grid ()</a></td>
	<td class="summary">update the display (main grid)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_track_changes">_track_changes (pos)</a></td>
	<td class="summary">decide if we need to update the display when the pattern editor has changed
 note: this method might be called hundreds of times when doing edits like
 cutting all notes from a pattern, so we need it to be really simple</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_line_is_visible">_line_is_visible (line_pos)</a></td>
	<td class="summary">check if a given line is within the visible range</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_track_is_visible">_track_is_visible (track_idx)</a></td>
	<td class="summary">check if a given track is within the visible range</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_follow_track">_follow_track ()</a></td>
	<td class="summary">when following the active track in Renoise, we call this method
 (track following is limited to sequencer tracks)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_get_track_page">_get_track_page (track_idx)</a></td>
	<td class="summary">figure out the active "track page" based on the supplied track index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_get_page_width">_get_page_width ()</a></td>
	<td class="summary">get the currently set page width</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_get_orientation">_get_orientation ()</a></td>
	<td class="summary">get the orientation of the main grid</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_attach_to_song">_attach_to_song ()</a></td>
	<td class="summary">add notifiers to relevant parts of the song</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_attach_to_pattern">_attach_to_pattern (new_song, patt_idx)</a></td>
	<td class="summary">add notifiers to the pattern</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_attach_alias_notifiers">_attach_alias_notifiers (new_song, patt_idx)</a></td>
	<td class="summary">monitor the current pattern for changes to it's aliases</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_attach_line_notifiers">_attach_line_notifiers (new_song, patt_idx)</a></td>
	<td class="summary">attach line notifiers to pattern
 check for existing notifiers first, and remove those
 then add pattern notifiers to pattern (including aliased slots)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#remove_line_notifiers">remove_line_notifiers (new_song)</a></td>
	<td class="summary">remove currently attached line notifiers</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#on_new_document">on_new_document ()</a></td>
	<td class="summary">inherited from Application</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_process_grid_event">_process_grid_event (x, y, state, btn)</a></td>
	<td class="summary">handle when button in main grid is pressed</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_obtain_instrument_by_name">_obtain_instrument_by_name (name)</a></td>
	<td class="summary">obtain instrument by name (track&lt;>instrument synchronization)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_copy_grid_button">_copy_grid_button (lx, ly, btn)</a></td>
	<td class="summary">invoked when starting a note-copy gesture (first held button)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_draw_volume_slider">_draw_volume_slider (volume)</a></td>
	<td class="summary">update display of volume slider</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_set_note">_set_note (note_obj, note, instrument, volume)</a></td>
	<td class="summary">write properties into provided note column</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_clear_note">_clear_note (note_obj)</a></td>
	<td class="summary">clear properties for note column</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_draw_grid_button">_draw_grid_button (button, note, current_track)</a></td>
	<td class="summary">assign color to button, based on note properties</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_volume_palette">_volume_palette (vol, max)</a></td>
	<td class="summary">figure out the color for a given volume level</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_set_basenote">_set_basenote (note_value)</a></td>
	<td class="summary">set basenote for new notes</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_transpose_basenote">_transpose_basenote (steps)</a></td>
	<td class="summary">transpose existing basenote by given amount</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_remove_notifiers">_remove_notifiers (new_song, observables)</a></td>
	<td class="summary">detach all previously attached notifiers first
 but don't even try to detach when a new song arrived.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#_walk_held_keys">_walk_held_keys (callback, toggle_exempt)</a></td>
	<td class="summary">apply a function to all held grid buttons, optionally adding them
 all to toggle_exempt table.</td>
	</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#self._keys_down">self._keys_down</a></td>
	<td class="summary">track held grid keys</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._toggle_exempt">self._toggle_exempt</a></td>
	<td class="summary">don't toggle off if pressing multiple on / transposing / etc</td>
	</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#self._base_note">self._base_note</a></td>
	<td class="summary">default note/volume</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._track_count">self._track_count</a></td>
	<td class="summary">default note-grid size</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._edit_page">self._edit_page</a></td>
	<td class="summary">the currently editing "page"</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._track_offset">self._track_offset</a></td>
	<td class="summary">the track offset (0-#tracks)</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._follow_player">self._follow_player</a></td>
	<td class="summary">true when song follow is enabled,
 set to false when using the line navigator</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._start_tracking">self._start_tracking</a></td>
	<td class="summary">a "fire once" flag, which is set when
 switching from "not follow" to "follow"</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._current_pattern">self._current_pattern</a></td>
	<td class="summary">remember the current pattern index here</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._current_line_index">self._current_line_index</a></td>
	<td class="summary">remember the current line index</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._line_notifiers">self._line_notifiers</a></td>
	<td class="summary">collect patterns indices with line_notifiers</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#self._alias_notifiers">self._alias_notifiers</a></td>
	<td class="summary">collect references to pattern-alias notifier methods</td>
	</tr>
</table>

<br/>
<br/>


    <h2><a name="Functions"></a>Functions</h2>
    <dl class="function">
    <dt>
    <a name = "__init"></a>
    <strong>__init (VarArg)</strong>
    </dt>
    <dd>
    constructor method


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">VarArg</span>
        )
        </li>
    </ul>



    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#">Duplex.Application</a>
    </ul>


</dd>
    <dt>
    <a name = "start_app"></a>
    <strong>start_app ()</strong>
    </dt>
    <dd>
    inherited from Application



    <h3>Returns:</h3>
    <ol>

        bool or nil
    </ol>


    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#start_app">Duplex.Application.start_app</a>
    </ul>


</dd>
    <dt>
    <a name = "stop_app"></a>
    <strong>stop_app ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#stop_app">Duplex.Application.stop_app</a>
    </ul>


</dd>
    <dt>
    <a name = "_build_app"></a>
    <strong>_build_app ()</strong>
    </dt>
    <dd>
    inherited from Application



    <h3>Returns:</h3>
    <ol>

        bool
    </ol>


    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#_build_app">Duplex.Application._build_app</a>
    </ul>


</dd>
    <dt>
    <a name = "_build_line"></a>
    <strong>_build_line ()</strong>
    </dt>
    <dd>
    line (up/down scrolling)







</dd>
    <dt>
    <a name = "_build_track"></a>
    <strong>_build_track ()</strong>
    </dt>
    <dd>
    track (sideways scrolling)







</dd>
    <dt>
    <a name = "_build_grid"></a>
    <strong>_build_grid ()</strong>
    </dt>
    <dd>
    construct user interface







</dd>
    <dt>
    <a name = "_build_level"></a>
    <strong>_build_level ()</strong>
    </dt>
    <dd>
    construct user interface







</dd>
    <dt>
    <a name = "_build_transpose"></a>
    <strong>_build_transpose ()</strong>
    </dt>
    <dd>
    construct user interface







</dd>
    <dt>
    <a name = "on_idle"></a>
    <strong>on_idle ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#on_idle">Duplex.Application.on_idle</a>
    </ul>


</dd>
    <dt>
    <a name = "_update_track_count"></a>
    <strong>_update_track_count ()</strong>
    </dt>
    <dd>
    update track navigator,
 on new song, and when tracks have been changed







</dd>
    <dt>
    <a name = "_update_position"></a>
    <strong>_update_position ()</strong>
    </dt>
    <dd>
    if the playback position is inside visible range of the sequencer, update
 the position indicator
 else, if follow mode is active, display the current page
 (called on_idle when playing)







</dd>
    <dt>
    <a name = "_update_page"></a>
    <strong>_update_page ()</strong>
    </dt>
    <dd>
    check if we should switch the active page/range inside the pattern







</dd>
    <dt>
    <a name = "get_pos"></a>
    <strong>get_pos ()</strong>
    </dt>
    <dd>
    get the current position (edit-pos when stopped, playpos when playing)



    <h3>Returns:</h3>
    <ol>

        SongPos
    </ol>




</dd>
    <dt>
    <a name = "set_page"></a>
    <strong>set_page (idx)</strong>
    </dt>
    <dd>
    set the current edit page


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">idx</span>
         (int)
        </li>
    </ul>





</dd>
    <dt>
    <a name = "jump_to_top"></a>
    <strong>jump_to_top ()</strong>
    </dt>
    <dd>
    jump to topmost page







</dd>
    <dt>
    <a name = "jump_to_bottom"></a>
    <strong>jump_to_bottom ()</strong>
    </dt>
    <dd>
    jump to bottommost page







</dd>
    <dt>
    <a name = "jump_to_prev_lines"></a>
    <strong>jump_to_prev_lines ()</strong>
    </dt>
    <dd>
    jump to previous page







</dd>
    <dt>
    <a name = "jump_to_next_lines"></a>
    <strong>jump_to_next_lines ()</strong>
    </dt>
    <dd>
    jump to next page







</dd>
    <dt>
    <a name = "post_jump_update"></a>
    <strong>post_jump_update ()</strong>
    </dt>
    <dd>
    update display after a jump







</dd>
    <dt>
    <a name = "_draw_position"></a>
    <strong>_draw_position (idx)</strong>
    </dt>
    <dd>
    called on_idle


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">idx</span>
            <span class="types"><span class="type">TRACE("StepSequencer</span></span>
        <em>draw</em>position(idx)",idx)
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_update_line_count"></a>
    <strong>_update_line_count ()</strong>
    </dt>
    <dd>
    update the range of the line navigator







</dd>
    <dt>
    <a name = "_update_line_buttons"></a>
    <strong>_update_line_buttons ()</strong>
    </dt>
    <dd>
    update the display (line buttons)







</dd>
    <dt>
    <a name = "_update_grid"></a>
    <strong>_update_grid ()</strong>
    </dt>
    <dd>
    update the display (main grid)







</dd>
    <dt>
    <a name = "_track_changes"></a>
    <strong>_track_changes (pos)</strong>
    </dt>
    <dd>
    decide if we need to update the display when the pattern editor has changed
 note: this method might be called hundreds of times when doing edits like
 cutting all notes from a pattern, so we need it to be really simple


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">pos</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "_line_is_visible"></a>
    <strong>_line_is_visible (line_pos)</strong>
    </dt>
    <dd>
    check if a given line is within the visible range


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">line_pos</span>
         (int)
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_track_is_visible"></a>
    <strong>_track_is_visible (track_idx)</strong>
    </dt>
    <dd>
    check if a given track is within the visible range


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">track_idx</span>
         (int)
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_follow_track"></a>
    <strong>_follow_track ()</strong>
    </dt>
    <dd>
    when following the active track in Renoise, we call this method
 (track following is limited to sequencer tracks)







</dd>
    <dt>
    <a name = "_get_track_page"></a>
    <strong>_get_track_page (track_idx)</strong>
    </dt>
    <dd>
    figure out the active "track page" based on the supplied track index


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">track_idx</span>
        , renoise track number
 return integer (0-number of pages)
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_get_page_width"></a>
    <strong>_get_page_width ()</strong>
    </dt>
    <dd>
    get the currently set page width



    <h3>Returns:</h3>
    <ol>

        int
    </ol>




</dd>
    <dt>
    <a name = "_get_orientation"></a>
    <strong>_get_orientation ()</strong>
    </dt>
    <dd>
    get the orientation of the main grid







</dd>
    <dt>
    <a name = "_attach_to_song"></a>
    <strong>_attach_to_song ()</strong>
    </dt>
    <dd>
    add notifiers to relevant parts of the song







</dd>
    <dt>
    <a name = "_attach_to_pattern"></a>
    <strong>_attach_to_pattern (new_song, patt_idx)</strong>
    </dt>
    <dd>
    add notifiers to the pattern


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">new_song</span>



        </li>
        <li><span class="parameter">patt_idx</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "_attach_alias_notifiers"></a>
    <strong>_attach_alias_notifiers (new_song, patt_idx)</strong>
    </dt>
    <dd>
    monitor the current pattern for changes to it's aliases


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">new_song</span>



        </li>
        <li><span class="parameter">patt_idx</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "_attach_line_notifiers"></a>
    <strong>_attach_line_notifiers (new_song, patt_idx)</strong>
    </dt>
    <dd>
    attach line notifiers to pattern
 check for existing notifiers first, and remove those
 then add pattern notifiers to pattern (including aliased slots)


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">new_song</span>



        </li>
        <li><span class="parameter">patt_idx</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "remove_line_notifiers"></a>
    <strong>remove_line_notifiers (new_song)</strong>
    </dt>
    <dd>
    remove currently attached line notifiers


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">new_song</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "on_new_document"></a>
    <strong>on_new_document ()</strong>
    </dt>
    <dd>
    inherited from Application





    <h3>See also:</h3>
    <ul>
         <a href="../modules/Duplex.Application.html#on_new_document">Duplex.Application.on_new_document</a>
    </ul>


</dd>
    <dt>
    <a name = "_process_grid_event"></a>
    <strong>_process_grid_event (x, y, state, btn)</strong>
    </dt>
    <dd>
    handle when button in main grid is pressed


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">x</span>



        </li>
        <li><span class="parameter">y</span>



        </li>
        <li><span class="parameter">state</span>



        </li>
        <li><span class="parameter">btn</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "_obtain_instrument_by_name"></a>
    <strong>_obtain_instrument_by_name (name)</strong>
    </dt>
    <dd>
    obtain instrument by name (track&lt;>instrument synchronization)


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">name</span>



        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

        (int) instrument index
    </ol>




</dd>
    <dt>
    <a name = "_copy_grid_button"></a>
    <strong>_copy_grid_button (lx, ly, btn)</strong>
    </dt>
    <dd>
    invoked when starting a note-copy gesture (first held button)


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">lx</span>
         (int)
        </li>
        <li><span class="parameter">ly</span>
         (int)
        </li>
        <li><span class="parameter">btn</span>
         (<a href="../modules/Duplex.UIButton.html#">Duplex.UIButton</a>)
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_draw_volume_slider"></a>
    <strong>_draw_volume_slider (volume)</strong>
    </dt>
    <dd>
    update display of volume slider


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">volume</span>
         (int), between 0-127
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_set_note"></a>
    <strong>_set_note (note_obj, note, instrument, volume)</strong>
    </dt>
    <dd>
    write properties into provided note column


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">note_obj</span>
         (NoteColumn)
        </li>
        <li><span class="parameter">note</span>
         (int) note pitch
        </li>
        <li><span class="parameter">instrument</span>
         (int) instrument number
        </li>
        <li><span class="parameter">volume</span>
         (int) note velocity
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_clear_note"></a>
    <strong>_clear_note (note_obj)</strong>
    </dt>
    <dd>
    clear properties for note column


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">note_obj</span>
         (NoteColumn)
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_draw_grid_button"></a>
    <strong>_draw_grid_button (button, note, current_track)</strong>
    </dt>
    <dd>
    assign color to button, based on note properties


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">button</span>



        </li>
        <li><span class="parameter">note</span>



        </li>
        <li><span class="parameter">current_track</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "_volume_palette"></a>
    <strong>_volume_palette (vol, max)</strong>
    </dt>
    <dd>
    figure out the color for a given volume level


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">vol</span>
         (int), between 0-127
        </li>
        <li><span class="parameter">max</span>
         (int), 127
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_set_basenote"></a>
    <strong>_set_basenote (note_value)</strong>
    </dt>
    <dd>
    set basenote for new notes


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">note_value</span>
         (int) note pitch
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_transpose_basenote"></a>
    <strong>_transpose_basenote (steps)</strong>
    </dt>
    <dd>
    transpose existing basenote by given amount


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">steps</span>
         (int) relative amount to add
        </li>
    </ul>





</dd>
    <dt>
    <a name = "_remove_notifiers"></a>
    <strong>_remove_notifiers (new_song, observables)</strong>
    </dt>
    <dd>
    detach all previously attached notifiers first
 but don't even try to detach when a new song arrived.  old observables
 will no longer be alive then...


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">new_song</span>
         (bool), true to leave existing notifiers alone
        </li>
        <li><span class="parameter">observables</span>

<ul>
    <li>list of observables</li>
</ul>

        </li>
    </ul>





</dd>
    <dt>
    <a name = "_walk_held_keys"></a>
    <strong>_walk_held_keys (callback, toggle_exempt)</strong>
    </dt>
    <dd>
    apply a function to all held grid buttons, optionally adding them
 all to toggle_exempt table.   return the number of held keys


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">callback</span>
         (function), the callback function
        </li>
        <li><span class="parameter">toggle_exempt</span>
         (bool), do not toggle off
        </li>
    </ul>





</dd>
</dl>
    <h2><a name="Tables"></a>Tables</h2>
    <dl class="function">
    <dt>
    <a name = "self._keys_down"></a>
    <strong>self._keys_down</strong>
    </dt>
    <dd>
    track held grid keys







</dd>
    <dt>
    <a name = "self._toggle_exempt"></a>
    <strong>self._toggle_exempt</strong>
    </dt>
    <dd>
    don't toggle off if pressing multiple on / transposing / etc







</dd>
</dl>
    <h2><a name="Fields"></a>Fields</h2>
    <dl class="function">
    <dt>
    <a name = "self._base_note"></a>
    <strong>self._base_note</strong>
    </dt>
    <dd>
    default note/volume







</dd>
    <dt>
    <a name = "self._track_count"></a>
    <strong>self._track_count</strong>
    </dt>
    <dd>
    default note-grid size







</dd>
    <dt>
    <a name = "self._edit_page"></a>
    <strong>self._edit_page</strong>
    </dt>
    <dd>
    the currently editing "page"







</dd>
    <dt>
    <a name = "self._track_offset"></a>
    <strong>self._track_offset</strong>
    </dt>
    <dd>
    the track offset (0-#tracks)







</dd>
    <dt>
    <a name = "self._follow_player"></a>
    <strong>self._follow_player</strong>
    </dt>
    <dd>
    true when song follow is enabled,
 set to false when using the line navigator







</dd>
    <dt>
    <a name = "self._start_tracking"></a>
    <strong>self._start_tracking</strong>
    </dt>
    <dd>
    a "fire once" flag, which is set when
 switching from "not follow" to "follow"







</dd>
    <dt>
    <a name = "self._current_pattern"></a>
    <strong>self._current_pattern</strong>
    </dt>
    <dd>
    remember the current pattern index here







</dd>
    <dt>
    <a name = "self._current_line_index"></a>
    <strong>self._current_line_index</strong>
    </dt>
    <dd>
    remember the current line index







</dd>
    <dt>
    <a name = "self._line_notifiers"></a>
    <strong>self._line_notifiers</strong>
    </dt>
    <dd>
    collect patterns indices with line_notifiers







</dd>
    <dt>
    <a name = "self._alias_notifiers"></a>
    <strong>self._alias_notifiers</strong>
    </dt>
    <dd>
    collect references to pattern-alias notifier methods







</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.2</a></i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
